getpid() Macro to Get Process ID #include <process.h> unsigned getpid(void); This is a macro that gets the process id of the program; under DOS this is the same as the segment value of the Program Segment Prefix (PSP). See getpsp() for more information.